unit UProxySet;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;

type
  TfrmProxySet = class(TForm)
    rbNoUseProxy: TRadioButton;
    rbUseProxy: TRadioButton;
    GBProxySet: TGroupBox;
    Panel1: TPanel;
    btOK: TButton;
    btCancel: TButton;
    ComboBox1: TComboBox;
    Label1: TLabel;
    LabeledEdit1: TLabeledEdit;
    LabeledEdit2: TLabeledEdit;
    LabeledEdit3: TLabeledEdit;
    LabeledEdit4: TLabeledEdit;
    procedure rbUseProxyClick(Sender: TObject);
    procedure btOKClick(Sender: TObject);
  private
    { Private declarations }
    FisProxy: boolean;
  public
    { Public declarations }
  end;

function EnterProxySet(var isProxy: boolean): boolean;

var
  frmProxySet: TfrmProxySet;

implementation

{$R *.dfm}

function EnterProxySet(var isProxy: boolean): boolean;
begin

  with TfrmProxySet.Create(application) do
  begin
    if ShowModal = mrok then
    begin
      isProxy := FisProxy;
      try

      finally
        free;
      end;
    end;

  end;

end;

procedure TfrmProxySet.btOKClick(Sender: TObject);
begin

  FisProxy := rbUseProxy.Checked;
end;

procedure TfrmProxySet.rbUseProxyClick(Sender: TObject);
begin
  GBProxySet.Enabled := TRadioButton(Sender).Checked;
end;

end.
